const http = require('http')
//创建web实例
const server = http.createServer()
//为服务器绑定request事件
server.on(  'request',function (req,res) {
    console.log("Some one vist our web server")
})
//启动服务器
server.listen(8080,function (){
    console.log("server running at 127.0.0.1:8080")
})
